﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Controls;
using System.Windows;

namespace QuickZip.UserControls
{
	public class VirutalWrapPanelView : ViewBase
	{
		public static readonly DependencyProperty OrientationProperty =
			VirtualWrapPanel.OrientationProperty.AddOwner(typeof(VirutalWrapPanelView));

		public Orientation Orientation
		{
			get { return (Orientation)GetValue(OrientationProperty); }
			set { SetValue(OrientationProperty, value); }
		}


		public static readonly DependencyProperty ItemContainerStyleProperty =
			ItemsControl.ItemContainerStyleProperty.AddOwner(typeof(VirutalWrapPanelView));

		public Style ItemContainerStyle
		{
			get { return (Style)GetValue(ItemContainerStyleProperty); }
			set { SetValue(ItemContainerStyleProperty, value); }
		}

		public static readonly DependencyProperty ItemTemplateProperty =
			ItemsControl.ItemTemplateProperty.AddOwner(typeof(VirutalWrapPanelView));

		public DataTemplate ItemTemplate
		{
			get { return (DataTemplate)GetValue(ItemTemplateProperty); }
			set { SetValue(ItemTemplateProperty, value); }
		}

		public static readonly DependencyProperty ItemWidthProperty =
			WrapPanel.ItemWidthProperty.AddOwner(typeof(VirutalWrapPanelView));

		public double ItemWidth
		{
			get { return (double)GetValue(ItemWidthProperty); }
			set { SetValue(ItemWidthProperty, value); }
		}


		public static readonly DependencyProperty ItemHeightProperty =
			WrapPanel.ItemHeightProperty.AddOwner(typeof(VirutalWrapPanelView));

		public double ItemHeight
		{
			get { return (double)GetValue(ItemHeightProperty); }
			set { SetValue(ItemHeightProperty, value); }
		}


		public static readonly DependencyProperty HorizontalContentAlignmentProperty =
			WrapPanel.HorizontalAlignmentProperty.AddOwner(typeof(VirutalWrapPanelView));

		public HorizontalAlignment HorizontalContentAlignment
		{
			get { return (HorizontalAlignment)GetValue(HorizontalContentAlignmentProperty); }
			set { SetValue(HorizontalContentAlignmentProperty, value); }
		}

		protected override object DefaultStyleKey
		{
			get
			{
				return new ComponentResourceKey(GetType(), "virtualWrapPanelViewDSK");
			}
		}

		protected override object ItemContainerDefaultStyleKey
		{
			get
			{
				return new ComponentResourceKey(GetType(), "virtualWrapPanelViewItemDSK");
			}
		}
	}
}
